#include <memory>
#define __host__
#define __device__
#include <vector_types.h>

#include <algorithm/analytical_model/algorithm/cuda/inter_op/receiver/Receiver.h>
#include <algorithm/analytical_model/algorithm/cuda/receiver/Receiver.cuh>
#include <utils/Utils.h>

using namespace solar::cuda::inter_op;

// Receiver::Receiver(cudaStream_t stream)
// {
//     this->delegate_ptr_ = std::make_shared<solar::cuda::Receiver>(stream);
// }

void Receiver::allocImage() const { this->delegate_ptr_->allocImage(); }

void Receiver::cleanImageContent() const { this->delegate_ptr_->cleanImageContent(); }

void Receiver::clear() const { this->delegate_ptr_->clear(); }

auto Receiver::getResolution() const -> Int2
{
    return structCopy<Int2>(this->delegate_ptr_->resolution_);
}

auto Receiver::getSize() const -> Float3 { return structCopy<Float3>(this->delegate_ptr_->size_); }

auto Receiver::getPosition() const -> Float3
{
    return structCopy<Float3>(this->delegate_ptr_->pos_);
}

auto Receiver::getNormal() const -> Float3
{
    return structCopy<Float3>(this->delegate_ptr_->normal_);
}

void Receiver::setResolution(const Int2& input) const
{
    structCopy(input, this->delegate_ptr_->resolution_);
}

void Receiver::setSize(const Float3& input) const { structCopy(input, this->delegate_ptr_->size_); }

void Receiver::setPosition(const Float3& input) const
{
    structCopy(input, this->delegate_ptr_->pos_);
}

void Receiver::setNormal(const Float3& input) const
{
    structCopy(input, this->delegate_ptr_->normal_);
}

auto Receiver::getSurfaceIndex() const -> int { return this->delegate_ptr_->surface_index_; }

void Receiver::setSurfaceIndex(int index) const { this->delegate_ptr_->surface_index_ = index; }
